<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOrdertasksTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('ordertasks', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('type')->unsigned()->nullable();
			$table->integer('orderId')->unsigned()->nullable();
			$table->date('deliveryDate')->nullable();
			$table->date('startDate')->nullable();
			$table->date('endDate')->nullable();
			$table->integer('goodsId')->nullable();
			$table->string('goodsName')->nullable();
			$table->float('output', 10, 0)->unsigned()->nullable();
			$table->float('alloted', 10, 0)->unsigned()->nullable();
			$table->float('finished', 10, 0)->unsigned()->nullable();
			$table->float('realFinish', 10, 0)->unsigned()->nullable();
			$table->float('storage', 10, 0)->unsigned()->nullable();
			$table->string('unit')->nullable();
			$table->string('notes')->nullable();
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('ordertasks');
	}

}
